package com.franklin.java.api.psi.comment;

import com.intellij.psi.PsiComment;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiMethod;
import com.intellij.psi.util.PsiTreeUtil;

import java.util.Arrays;
import java.util.List;

/**
 * 方法注释解析器
 * @author Franklin
 * @since 2021/9/2 14:41
 */
class PsiMethodCommentResolver extends AbstractPsiCommentResolver<PsiMethod> {
    @Override
    public String resolveComment(PsiMethod psiMethod) {
//        List<PsiComment> psiComments = PsiTreeUtil.getChildrenOfTypeAsList(psiMethod, PsiComment.class);
//        PsiMethod[] superMethods = psiMethod.findSuperMethods();
//        Arrays.stream(superMethods)
//            .flatMap(method -> PsiTreeUtil.getChildrenOfTypeAsList(method, PsiComment.class).stream())
//            .
        return null;
    }

    @Override
    public String resolveSimpleComment(PsiMethod psiMethod) {
        return null;
    }
}
